package org.example.common.dto;

import com.baomidou.mybatisplus.annotation.TableField;
import lombok.AllArgsConstructor;
import lombok.Data;
import org.example.entity.Hotel;

import java.io.Serializable;

@Data
@AllArgsConstructor
public class HotelDto implements Serializable {

    private Long id;

    private String name;

    private String address;

    private Integer price;

    private Integer score;

    private String brand;

    private String city;

    private String starName;

    private String business;

    private String position;

    private String pic;

    public HotelDto (Hotel hotel)
    {
        this.id = hotel.getId();
        this.name = hotel.getName();
        this.address = hotel.getAddress();
        this.price = hotel.getPrice();
        this.score = hotel.getScore();
        this.city = hotel.getCity();
        this.starName = hotel.getStarName();
        this.business  = hotel.getBusiness();
        this.brand = hotel.getBrand();
        this.position = hotel.getLatitude() + "," +hotel.getLongitude();
        this.pic = hotel.getPic();
    }
}
